﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Python
{
    class RandomPositioner
    {
        int _x;
        int _y;
        public int X {get {return _x;}}
        public int Y {get {return _y;}}
        
        public RandomPositioner(Point positionOfSnakeHead)
        {
            Conf config = new Conf();
            do {
                Random rnd = new Random();
                _x = rnd.Next(config._origCol + 1, Controller._FieldWidth + config._origCol);
            } while(_x == positionOfSnakeHead.X);
            do {
                Random rnd = new Random();
                _y = rnd.Next(config._origRow + 1, Controller._FieldHeght + config._origRow);
            } while(_y == positionOfSnakeHead.Y);

        }        
    }
}
